package com.atguigu.crud.bean;

public class Emp {
    private Integer id;

    private String empName;

    private String sex;

    private String email;

    private String deptId;

    public Emp(Integer id, String empname, String sex, String email, String deptid) {
        this.id = id;
        this.empName = empname;
        this.sex = sex;
        this.email = email;
        this.deptId = deptid;
    }

    public Emp() {
    }

    /*一个员工对应一个部门*/
    private Dept dept;

    public Dept getDept() {
        return dept;
    }

    public void setDept(Dept dept) {
        this.dept = dept;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEmpName() {
        return empName;
    }

    public void setEmpName(String empName) {
        this.empName = empName == null ? null : empName.trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getDeptid() {
        return deptId;
    }

    public void setDeptid(String deptid) {
        this.deptId = deptid == null ? null : deptid.trim();
    }

    @Override
    public String toString() {
        return "Emp{" +
                "id=" + id +
                ", empName='" + empName + '\'' +
                ", sex='" + sex + '\'' +
                ", email='" + email + '\'' +
                ", deptId='" + deptId + '\'' +
                ", dept=" + dept +
                '}';
    }
}